package com.pubinfo.passbook.common.model.constant;

/**
 * 用户操作枚举类
 *
 * @author litiewang
 */
public enum TaskStatusEnum implements EnumCodeList.CodeListItem {
  
  /**
   * 0=停止
   */
  STOP("0", "停止"),
  /**
   * 1=运行
   */
  RUNNING("1", "运行");
  
  public String value = null;
  public String code = null;
  
  TaskStatusEnum(String _code, String _value) {
    this.value = _value;
    this.code = _code;
  }
  
  public static TaskStatusEnum getEnumByKey(String key) {
    for (TaskStatusEnum e : TaskStatusEnum.values()) {
      if (e.getCode().equals(key)) {
        return e;
      }
    }
    return null;
  }
  
  /**
   * 获取value
   */
  @Override
  public String getValue() {
    return value;
  }
  
  /**
   * 获取code
   */
  @Override
  public String getCode() {
    return code;
  }
}

